3.154 \(\int \sec (e+f x) (a+b \sec ^2(e+f x)) \, dx\)

Optimal. Leaf size=40 \[ \frac {(2 a+b) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {b \tan (e+f x) \sec (e+f x)}{2 f} \]

[Out]

1/2*(2*a+b)*arctanh(sin(f*x+e))/f+1/2*b*sec(f*x+e)*tan(f*x+e)/f

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {4046, 3770} \[ \frac {(2 a+b) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {b \tan (e+f x) \sec (e+f x)}{2 f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]*(a + b*Sec[e + f*x]^2),x]

[Out]

((2*a + b)*ArcTanh[Sin[e + f*x]])/(2*f) + (b*Sec[e + f*x]*Tan[e + f*x])/(2*f)

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4046

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> -Simp[(C*Cot[
e + f*x]*(b*Csc[e + f*x])^m)/(f*(m + 1)), x] + Dist[(C*m + A*(m + 1))/(m + 1), Int[(b*Csc[e + f*x])^m, x], x]
/; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] &&  !LeQ[m, -1]

Rubi steps

\begin {align*} \int \sec (e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=\frac {b \sec (e+f x) \tan (e+f x)}{2 f}+\frac {1}{2} (2 a+b) \int \sec (e+f x) \, dx\\ &=\frac {(2 a+b) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {b \sec (e+f x) \tan (e+f x)}{2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 48, normalized size = 1.20 \[ \frac {a \tanh ^{-1}(\sin (e+f x))}{f}+\frac {b \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {b \tan (e+f x) \sec (e+f x)}{2 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]*(a + b*Sec[e + f*x]^2),x]

[Out]

(a*ArcTanh[Sin[e + f*x]])/f + (b*ArcTanh[Sin[e + f*x]])/(2*f) + (b*Sec[e + f*x]*Tan[e + f*x])/(2*f)

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 72, normalized size = 1.80 \[ \frac {{\left (2 \, a + b\right )} \cos \left (f x + e\right )^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (2 \, a + b\right )} \cos \left (f x + e\right )^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, b \sin \left (f x + e\right )}{4 \, f \cos \left (f x + e\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

1/4*((2*a + b)*cos(f*x + e)^2*log(sin(f*x + e) + 1) - (2*a + b)*cos(f*x + e)^2*log(-sin(f*x + e) + 1) + 2*b*si
n(f*x + e))/(f*cos(f*x + e)^2)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)2/f*(-(2*a+b)/8*ln(abs(sin(f*x+exp(1))-1))+(2*a+b)/8*ln(abs(si
n(f*x+exp(1))+1))-sin(f*x+exp(1))*b*1/4/(sin(f*x+exp(1))^2-1))

________________________________________________________________________________________

maple [A]  time = 0.79, size = 59, normalized size = 1.48 \[ \frac {a \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}+\frac {b \sec \left (f x +e \right ) \tan \left (f x +e \right )}{2 f}+\frac {b \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(a+b*sec(f*x+e)^2),x)

[Out]

1/f*a*ln(sec(f*x+e)+tan(f*x+e))+1/2*b*sec(f*x+e)*tan(f*x+e)/f+1/2/f*b*ln(sec(f*x+e)+tan(f*x+e))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 58, normalized size = 1.45 \[ \frac {{\left (2 \, a + b\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (2 \, a + b\right )} \log \left (\sin \left (f x + e\right ) - 1\right ) - \frac {2 \, b \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1}}{4 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

1/4*((2*a + b)*log(sin(f*x + e) + 1) - (2*a + b)*log(sin(f*x + e) - 1) - 2*b*sin(f*x + e)/(sin(f*x + e)^2 - 1)
)/f

________________________________________________________________________________________

mupad [B]  time = 4.41, size = 41, normalized size = 1.02 \[ \frac {\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )\,\left (a+\frac {b}{2}\right )}{f}-\frac {b\,\sin \left (e+f\,x\right )}{2\,f\,\left ({\sin \left (e+f\,x\right )}^2-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cos(e + f*x)^2)/cos(e + f*x),x)

[Out]

(atanh(sin(e + f*x))*(a + b/2))/f - (b*sin(e + f*x))/(2*f*(sin(e + f*x)^2 - 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \sec {\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+b*sec(f*x+e)**2),x)

[Out]

Integral((a + b*sec(e + f*x)**2)*sec(e + f*x), x)

________________________________________________________________________________________